<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.w3.org/1999/xhtml">

<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>

<body>
<h1>首页2</h1>
<p th:text="${msg}"></p>

<hr>
<div shiro:hasPermission="add">
    <a th:href="@{/user/add}">add</a> |
</div>
<div shiro:hasPermission="update">
    <a th:href="@{/user/update}">update</a>
</div>

<div th:if="${session.login==false}">
    <a th:href="@{/toLogin}">登录</a>
</div>


<div th:if="${session.login==true}">
    <a th:href="@{/logout}">退出</a>
</div>

</body>
</html>